<?php

header('Content-Type:application/json');//这个类型声明非常关键
header('Access-Control-Allow-Origin: *');//避免跨域

$array = [
    'status'  => 0,
    'message' => [
        [
            "id"             => 101,
            "title"          => '粗粮手机 MIX3',
            "add_time"       => '2018-10-29T18:34:55.000Z',
            "goods_no"       => 'XM2478328329',
            "stock_quantity" => 20,
            "market_price"   => 3299,
            "sell_price"     => 3299
        ]
    ]
];
echo json_encode($array);